import 'package:flutter_taotaoshipin/generated/json/base/json_convert_content.dart';
import 'package:flutter_taotaoshipin/model/order_query_entity.dart';

OrderQueryEntity $OrderQueryEntityFromJson(Map<String, dynamic> json) {
  final OrderQueryEntity orderQueryEntity = OrderQueryEntity();
  final String? orderId = jsonConvert.convert<String>(json['order_id']);
  if (orderId != null) {
    orderQueryEntity.orderId = orderId;
  }
  final int? status = jsonConvert.convert<int>(json['status']);
  if (status != null) {
    orderQueryEntity.status = status;
  }
  return orderQueryEntity;
}

Map<String, dynamic> $OrderQueryEntityToJson(OrderQueryEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['order_id'] = entity.orderId;
  data['status'] = entity.status;
  return data;
}

extension OrderQueryEntityExtension on OrderQueryEntity {
  OrderQueryEntity copyWith({
    String? orderId,
    int? status,
  }) {
    return OrderQueryEntity()
      ..orderId = orderId ?? this.orderId
      ..status = status ?? this.status;
  }
}